home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Desktop Publisher's Dream 1994
/
Desktop Publisher's Dream 1994.iso
/
prog_c
/
grafxlib.arc
/
MACROS.AH
< prev
next >
Wrap
Text File
|
1987-08-31
|
2KB
|
120 lines
;
; grafix --- macros.ah
;
; general purpose definitions
;
; Written 4/87 by Scott Snyder (ssnyder@romeo.caltech.edu or @citromeo.bitnet)
;
; Memory model stuff added 5/29/87 by sss
;
;include model.inc
;
; break down modules
;
ifdef SMALL
NEARDATA equ 1
NEARCODE equ 1
endif
ifdef COMPACT
FARDATA equ 1
NEARCODE equ 1
endif
ifdef MEDIUM
NEARDATA equ 1
FARCODE equ 1
endif
ifdef LARGE
FARDATA equ 1
FARCODE equ 1
endif
;
; define model-dependent parameters
;
ifdef NEARCODE
argbase equ 4
endif
ifdef FARCODE
argbase equ 6
endif
;
; macros
;
cseg macro moduleName
ifdef FARCODE
moduleName&_TEXT segment byte public 'CODE'
assume cs: moduleName&_TEXT
else
_TEXT segment byte public 'CODE'
assume cs: _TEXT
endif
endm
endcs macro moduleName
ifdef FARCODE
moduleName&_TEXT ends
else
_TEXT ends
endif
endm
pBegin macro pName
ifdef FARCODE
pName proc far
else
pName proc near
endif
endm
pEnd macro pName
pName endp
endm
dseg macro
assume ds:DGROUP
_DATA segment byte public 'DATA'
endm
endds macro
_DATA ends
endm
sseg macro
DGROUP group _STACK, _DATA
assume ss:DGROUP
_STACK segment word stack 'STACK'
endm
endss macro
_STACK ends
endm
df macro sym
public sym
_&sym = sym
public _&sym
endm
ex macro sym, typ
extrn _&sym : typ
sym equ _&sym
endm
exProc macro pName
ifdef FARCODE
ex pName, far
else
ex pName, near
endif
endm